<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">
<script>
    (function () {
        if ('') {
            if (prompt('请输入文章密码') !== '') {
                alert('密码错误！');
                if (history.length === 1) {
                    location.replace("https://google.com"); // 这里替换成你的首页
                } else {
                    history.back();
                }
            }
        }
    })();
</script>








<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="命令行,工具,">










<meta name="description" content="安装node1234567891011121314151617181920yum install -y node npm安装node版本管理工具&apos;n&apos;;$ sudo npm install n -g$  sudo n stable  （安装node最新版本）$  sudo n 8.9.4 （安装node指定版本8.9.4）$  vim /etc/profile将node安装的路径（这里为：/usr">
<meta name="keywords" content="命令行,工具">
<meta property="og:type" content="article">
<meta property="og:title" content="npm命令行工具收集">
<meta property="og:url" content="http://yoursite.com/2018/11/28/命令行工具收集/index.html">
<meta property="og:site_name" content="苏生不惑的博客">
<meta property="og:description" content="安装node1234567891011121314151617181920yum install -y node npm安装node版本管理工具&apos;n&apos;;$ sudo npm install n -g$  sudo n stable  （安装node最新版本）$  sudo n 8.9.4 （安装node指定版本8.9.4）$  vim /etc/profile将node安装的路径（这里为：/usr">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2020-01-08T07:01:49.939Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="npm命令行工具收集">
<meta name="twitter:description" content="安装node1234567891011121314151617181920yum install -y node npm安装node版本管理工具&apos;n&apos;;$ sudo npm install n -g$  sudo n stable  （安装node最新版本）$  sudo n 8.9.4 （安装node指定版本8.9.4）$  vim /etc/profile将node安装的路径（这里为：/usr">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2018/11/28/命令行工具收集/">



<meta name="referrer" content="never"> ​​​​


  <title>npm命令行工具收集 | 苏生不惑的博客</title>
  








</head>

<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">苏生不惑的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br>
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2018/11/28/命令行工具收集/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="苏生不惑">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="苏生不惑的博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">npm命令行工具收集</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-11-28T16:05:25+08:00">
                2018-11-28
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv"><i class="fa fa-file-o"></i>
            <span class="busuanzi-value" id="busuanzi_value_page_pv"></span>次
            </span>
          

          
            <div class="post-wordcount">
              
                
                  <span class="post-meta-divider">|</span>
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  5.6k 字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  30 分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h3 id="安装node"><a href="#安装node" class="headerlink" title="安装node"></a>安装node</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">yum install -y node npm</span><br><span class="line">安装node版本管理工具<span class="string">'n'</span>;</span><br><span class="line"></span><br><span class="line">$ sudo npm install n -g</span><br><span class="line">$  sudo n stable  （安装node最新版本）</span><br><span class="line"></span><br><span class="line">$  sudo n <span class="number">8.9</span><span class="number">.4</span> （安装node指定版本<span class="number">8.9</span><span class="number">.4</span>）</span><br><span class="line">$  vim /etc/profile</span><br><span class="line">将node安装的路径（这里为：/usr/local/n/versions/node/<span class="number">8.9</span><span class="number">.4</span>）添加到文件末尾；</span><br><span class="line"></span><br><span class="line">#set node path</span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span> NODE_HOME=<span class="regexp">/usr/</span>local/n/versions/node/<span class="number">8.9</span><span class="number">.4</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span> PATH=$NODE_HOME/bin:$PATH</span><br><span class="line">wq退出保存文件，编译/etc/profile;</span><br><span class="line"></span><br><span class="line">$ source /etc/profile</span><br><span class="line"></span><br><span class="line">npm install -g cnpm --registry=https:<span class="comment">//registry.npm.taobao.org</span></span><br></pre></td></tr></table></figure>
<h3 id="显示npm命令行包"><a href="#显示npm命令行包" class="headerlink" title="显示npm命令行包"></a>显示npm命令行包</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br></pre></td><td class="code"><pre><span class="line">命令行工具安装目录which pinyin: <span class="regexp">/c/</span>Users/xxx/AppData/Roaming/npm/pinyin</span><br><span class="line">npm ls -g --depth=0 #对应的有web版 https://q-nick.github.io/npm-gui/ https://720kb.github.io/ndm/</span><br><span class="line">npm ls -g # 查看全局安装的模块</span><br><span class="line"></span><br><span class="line">#node 包网站地址 https://www.npmjs.com/package/fanyi</span><br><span class="line">$ npm ls -g --depth=<span class="number">0</span></span><br><span class="line">d:\nodejs</span><br><span class="line">+-- @vue/cli@<span class="number">3.0</span><span class="number">.0</span>-alpha<span class="number">.5</span></span><br><span class="line">+-- admin-mongo@<span class="number">0.0</span><span class="number">.23</span></span><br><span class="line">+-- adr@<span class="number">1.0</span><span class="number">.7</span></span><br><span class="line">+-- airing-translator@<span class="number">1.0</span><span class="number">.4</span></span><br><span class="line">+-- anyproxy@<span class="number">4.0</span><span class="number">.6</span></span><br><span class="line">+-- anywhere@<span class="number">1.4</span><span class="number">.0</span></span><br><span class="line">+-- apidoc@<span class="number">0.17</span><span class="number">.6</span></span><br><span class="line">+-- asciify@<span class="number">1.3</span><span class="number">.5</span></span><br><span class="line">+-- babel@<span class="number">5.6</span><span class="number">.23</span></span><br><span class="line">+--  error: ENOENT: no such file or directory, open <span class="string">'d:\nodejs\node_modules\babel-cli\package.json</span></span><br><span class="line"><span class="string">+-- baidu-ocr-api@2.0.5</span></span><br><span class="line"><span class="string">+-- bash-handbook@2.9.7</span></span><br><span class="line"><span class="string">+-- bower@1.2.8</span></span><br><span class="line"><span class="string">+-- browser-sync@2.18.8</span></span><br><span class="line"><span class="string">+-- brunch@1.7.14</span></span><br><span class="line"><span class="string">+-- btc@0.0.4</span></span><br><span class="line"><span class="string">+-- bugfreejs@1.2.0</span></span><br><span class="line"><span class="string">+-- caniuse-cmd@1.3.1</span></span><br><span class="line"><span class="string">+-- cash@0.8.0</span></span><br><span class="line"><span class="string">+-- cellocate@0.1.4</span></span><br><span class="line"><span class="string">+-- clean-scripts@1.2.1</span></span><br><span class="line"><span class="string">+-- cli-scraper@1.0.2</span></span><br><span class="line"><span class="string">+-- cloc@2.2.0</span></span><br><span class="line"><span class="string">+-- cnpm@4.2.0</span></span><br><span class="line"><span class="string">+-- codedog@0.0.4</span></span><br><span class="line"><span class="string">+-- coffee-script@1.7.1</span></span><br><span class="line"><span class="string">+-- component@1.1.0</span></span><br><span class="line"><span class="string">+-- cortex@5.4.6</span></span><br><span class="line"><span class="string">+-- cqc@0.1.3</span></span><br><span class="line"><span class="string">+-- crawl-pet@0.0.3</span></span><br><span class="line"><span class="string">+-- diffchecker@0.1.4</span></span><br><span class="line"><span class="string">+-- docsify-cli@4.2.1</span></span><br><span class="line"><span class="string">+-- domain-cli@0.1.10</span></span><br><span class="line"><span class="string">+-- doubanfm@0.1.4</span></span><br><span class="line"><span class="string">+-- doxmate@0.2.5</span></span><br><span class="line"><span class="string">+-- electron-pdf@1.2.0</span></span><br><span class="line"><span class="string">+-- everblog@1.1.0</span></span><br><span class="line"><span class="string">+-- express@3.4.8</span></span><br><span class="line"><span class="string">+-- fanyi@2.0.1</span></span><br><span class="line"><span class="string">+-- fe-interview@4.10.2</span></span><br><span class="line"><span class="string">+-- figlet@1.2.0</span></span><br><span class="line"><span class="string">+-- fis@1.7.14</span></span><br><span class="line"><span class="string">+-- fjpublish@2.0.0</span></span><br><span class="line"><span class="string">+-- forever@0.15.3</span></span><br><span class="line"><span class="string">+-- fund@1.0.0</span></span><br><span class="line"><span class="string">+-- fx@3.1.0</span></span><br><span class="line"><span class="string">+-- generator-generator@0.4.2 -&gt; e:\node\generator-kissy-gallery</span></span><br><span class="line"><span class="string">+-- gifify@2.4.0</span></span><br><span class="line"><span class="string">+-- girlcrawler@1.1.0</span></span><br><span class="line"><span class="string">+-- git-recall@1.2.4</span></span><br><span class="line"><span class="string">+-- gitbook@3.2.2</span></span><br><span class="line"><span class="string">+-- gitbook-cli@2.3.0</span></span><br><span class="line"><span class="string">+-- google-cli@0.1.0</span></span><br><span class="line"><span class="string">+-- grank@1.0.18</span></span><br><span class="line"><span class="string">+-- grunt-cli@0.1.13</span></span><br><span class="line"><span class="string">+-- gtop@0.1.6</span></span><br><span class="line"><span class="string">+-- gulp@3.8.10</span></span><br><span class="line"><span class="string">+-- helloshell@0.0.1</span></span><br><span class="line"><span class="string">+-- hexo@2.8.2</span></span><br><span class="line"><span class="string">+-- hexo-cli@1.1.0</span></span><br><span class="line"><span class="string">+-- html-pdf@2.1.0</span></span><br><span class="line"><span class="string">+-- http-proxy-to-socks@1.0.1</span></span><br><span class="line"><span class="string">+-- http-server@0.9.0</span></span><br><span class="line"><span class="string">+-- idoc@0.1.2</span></span><br><span class="line"><span class="string">+-- irest-cli@1.0.5</span></span><br><span class="line"><span class="string">+-- jscpd@0.6.17</span></span><br><span class="line"><span class="string">+-- jsdoc@3.3.0-alpha10</span></span><br><span class="line"><span class="string">+-- json-server@0.9.6</span></span><br><span class="line"><span class="string">+-- jsonplaceholder@0.2.4</span></span><br><span class="line"><span class="string">+-- juejin@1.0.14</span></span><br><span class="line"><span class="string">+--  error: ENOENT: no such file or directory, open '</span>d:\nodejs\node_modules\karma\package.json</span><br><span class="line">+-- koy@<span class="number">0.0</span><span class="number">.7</span></span><br><span class="line">+-- laravel-echo-server@<span class="number">1.3</span><span class="number">.8</span></span><br><span class="line">+-- learnyounode@<span class="number">0.4</span><span class="number">.1</span></span><br><span class="line">+-- leetcode-cli@<span class="number">0.9</span><span class="number">.0</span></span><br><span class="line">+-- lighthouse@<span class="number">2.3</span><span class="number">.0</span></span><br><span class="line">+-- lint-md@<span class="number">0.0</span><span class="number">.4</span></span><br><span class="line">+-- livepool@<span class="number">0.7</span><span class="number">.9</span></span><br><span class="line">+-- livereloadx@<span class="number">0.3</span><span class="number">.6</span></span><br><span class="line">+-- liyu@<span class="number">0.1</span><span class="number">.2</span></span><br><span class="line">+-- localtunnel@<span class="number">1.9</span><span class="number">.0</span></span><br><span class="line">+-- lyric-dl@<span class="number">0.1</span><span class="number">.4</span></span><br><span class="line">+-- m-<span class="built_in">console</span>@<span class="number">0.1</span><span class="number">.0</span></span><br><span class="line">+-- mailit@<span class="number">0.0</span><span class="number">.3</span></span><br><span class="line">+-- manet@<span class="number">0.4</span><span class="number">.19</span></span><br><span class="line">+-- mapscii@<span class="number">0.1</span><span class="number">.7</span></span><br><span class="line">+-- markdown-it@<span class="number">8.3</span><span class="number">.1</span></span><br><span class="line">+-- markdown-pdf@<span class="number">7.0</span><span class="number">.0</span></span><br><span class="line">+-- measure-<span class="keyword">export</span>-cli@<span class="number">0.5</span><span class="number">.2</span></span><br><span class="line">+-- mpspider@<span class="number">1.0</span><span class="number">.1</span></span><br><span class="line">+-- nativefier@<span class="number">7.5</span><span class="number">.4</span></span><br><span class="line">+-- node-cube@<span class="number">0.1</span><span class="number">.0</span></span><br><span class="line">+-- node-inspector@<span class="number">0.7</span><span class="number">.3</span></span><br><span class="line">+-- node-reveal@<span class="number">1.2</span><span class="number">.2</span></span><br><span class="line">+-- nodemon@<span class="number">1.0</span><span class="number">.17</span></span><br><span class="line">+-- nodeppt@<span class="number">0.8</span><span class="number">.9</span><span class="number">-1</span></span><br><span class="line">+-- npm@<span class="number">3.10</span><span class="number">.10</span></span><br><span class="line">+-- oji@<span class="number">1.0</span><span class="number">.7</span></span><br><span class="line">+-- page2image@<span class="number">1.7</span><span class="number">.1</span></span><br><span class="line">+-- parcel-bundler@<span class="number">1.3</span><span class="number">.0</span></span><br><span class="line">+-- pdf-bot@<span class="number">0.3</span><span class="number">.3</span></span><br><span class="line">+-- pinyin@<span class="number">2.3</span><span class="number">.3</span></span><br><span class="line">+-- pm2@<span class="number">3.0</span><span class="number">.0</span></span><br><span class="line">+-- ppt-cli@<span class="number">1.2</span><span class="number">.9</span></span><br><span class="line">+-- puer@<span class="number">1.1</span><span class="number">.4</span></span><br><span class="line">+-- purify-css@<span class="number">1.2</span><span class="number">.5</span></span><br><span class="line">+-- qrcode-terminal@<span class="number">0.12</span><span class="number">.0</span></span><br><span class="line">+-- rdoc@<span class="number">1.3</span><span class="number">.4</span></span><br><span class="line">+-- requirejs@<span class="number">2.1</span><span class="number">.15</span></span><br><span class="line">+-- rocket-cli@<span class="number">0.0</span><span class="number">.5</span></span><br><span class="line">+-- runtime-cli@<span class="number">3.2</span><span class="number">.0</span></span><br><span class="line">+-- serve@<span class="number">6.3</span><span class="number">.1</span></span><br><span class="line">+-- server-mock@<span class="number">1.0</span><span class="number">.5</span></span><br><span class="line">+-- sharemd-cli@<span class="number">0.0</span><span class="number">.2</span></span><br><span class="line">+-- simpler-paper@<span class="number">0.1</span><span class="number">.5</span></span><br><span class="line">+-- socket-pipe@<span class="number">2.4</span><span class="number">.0</span></span><br><span class="line">+-- speed-test@<span class="number">2.0</span><span class="number">.0</span></span><br><span class="line">+-- spm@<span class="number">2.2</span><span class="number">.5</span></span><br><span class="line">+-- sqlpad@<span class="number">2.3</span><span class="number">.2</span></span><br><span class="line">+-- stacks-cli@<span class="number">0.1</span><span class="number">.44</span></span><br><span class="line">+-- suoxie@<span class="number">0.6</span><span class="number">.0</span></span><br><span class="line">+-- t-get@<span class="number">1.1</span><span class="number">.0</span></span><br><span class="line">+-- terminal-translate@<span class="number">1.0</span><span class="number">.4</span></span><br><span class="line">+-- tianshu@<span class="number">0.9</span><span class="number">.1</span></span><br><span class="line">+-- tldr@<span class="number">1.6</span><span class="number">.0</span></span><br><span class="line">+-- todo-live@<span class="number">0.1</span><span class="number">.3</span></span><br><span class="line">+-- translator-cli@<span class="number">0.3</span><span class="number">.0</span></span><br><span class="line">+-- truffle@<span class="number">4.1</span><span class="number">.13</span></span><br><span class="line">+-- u.nu@<span class="number">0.0</span><span class="number">.2</span></span><br><span class="line">+-- uncss@<span class="number">0.8</span><span class="number">.1</span></span><br><span class="line">+-- v2ex-cli@<span class="number">0.2</span><span class="number">.6</span></span><br><span class="line">+--  error: ENOENT: no such file or directory, open <span class="string">'d:\nodejs\node_modules\vian\package.json</span></span><br><span class="line"><span class="string">+-- vue-cli@2.5.1</span></span><br><span class="line"><span class="string">+-- webpack@1.14.0</span></span><br><span class="line"><span class="string">+-- webtorrent-cli@1.10.1</span></span><br><span class="line"><span class="string">+-- weinre@2.0.0-pre-HZO3BMNG</span></span><br><span class="line"><span class="string">+-- whay@1.1.0</span></span><br><span class="line"><span class="string">+-- whistle@1.12.0</span></span><br><span class="line"><span class="string">+-- world-cup-cli-dashboard@1.6.0</span></span><br><span class="line"><span class="string">+-- wtfjs@1.3.0</span></span><br><span class="line"><span class="string">+-- wtfpython@1.2.4</span></span><br><span class="line"><span class="string">+-- xmocker-cli@1.0.2</span></span><br><span class="line"><span class="string">+-- xmysql@0.1.8</span></span><br><span class="line"><span class="string">+-- xxb@0.0.2</span></span><br><span class="line"><span class="string">+-- yddict@1.0.2</span></span><br><span class="line"><span class="string">+-- yo@1.1.2</span></span><br><span class="line"><span class="string">+-- your-name@1.0.1</span></span><br><span class="line"><span class="string">+-- yrm@1.0.6</span></span><br><span class="line"><span class="string">+-- commitizen@2.10.1</span></span><br><span class="line"><span class="string">`-- zan-proxy@4.0.17</span></span><br></pre></td></tr></table></figure>
<h3 id="文件比较"><a href="#文件比较" class="headerlink" title="文件比较"></a>文件比较</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm install -g diffchecker</span><br><span class="line">diffchecker file1.js file2.js</span><br><span class="line">diffchecker --expire day file1.js file2.js</span><br></pre></td></tr></table></figure>
<h3 id="录制-CLI"><a href="#录制-CLI" class="headerlink" title="录制 CLI"></a>录制 CLI</h3><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm install -g svg-term-cli</span><br><span class="line">svg-term --cast=<span class="number">113643</span> --out examples/parrot.svg --<span class="built_in">window</span></span><br><span class="line">#https://github.com/marionebl/svg-term-cli</span><br></pre></td></tr></table></figure>
<h3 id="gitbook-cli"><a href="#gitbook-cli" class="headerlink" title="gitbook-cli"></a>gitbook-cli</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//https://www.omybug.com/2016/07/06/GitBook%E4%BD%BF%E7%94%A8/</span></span><br><span class="line">cnpm install -g gitbook-cli</span><br><span class="line">gitbook -V</span><br><span class="line">新建目录mybook，在目录中输入新建文件夹SUMMARY.md，先建立一个目录，输入一下内容</span><br><span class="line"></span><br><span class="line">* [简介](README.md)</span><br><span class="line">* [第一章](chapter1/README.md)</span><br><span class="line"> - [第一节](chapter1/section1.md)</span><br><span class="line"> - [第二节](chapter1/section2.md)</span><br><span class="line">* [第二章](chapter2/README.md)</span><br><span class="line"> - [第一节](chapter2/section1.md)</span><br><span class="line"> - [第二节](chapter2/section2.md)</span><br><span class="line">* [结束](end/README.md)</span><br><span class="line">执行命令自动生成各章节文件</span><br><span class="line"></span><br><span class="line">gitbook init</span><br><span class="line">导出成html</span><br><span class="line"></span><br><span class="line">gitbook build</span><br><span class="line">本地测试</span><br><span class="line"></span><br><span class="line">gitbook serve</span><br><span class="line">启动就可以通过以下地址访问效果了</span><br><span class="line"></span><br><span class="line">http:<span class="comment">//localhost:4000/</span></span><br><span class="line">当你编辑过文件之后，不需要重新启动serve，在线刷新一下就可以看到效果</span><br><span class="line">gitbook help <span class="comment">//列出gitbook所有的命令</span></span><br><span class="line">gitbook –help <span class="comment">//输出gitbook-cli的帮助信息</span></span><br><span class="line">gitbook build –gitbook=<span class="number">2.0</span><span class="number">.1</span> <span class="comment">//生成时指定gitbook的版本, 本地没有会先下载</span></span><br><span class="line">gitbook ls <span class="comment">//列出本地所有的gitbook版本</span></span><br><span class="line">gitbook ls-remote <span class="comment">//列出远程可用的gitbook版本</span></span><br><span class="line">gitbook fetch 标签/版本号 <span class="comment">//安装对应的gitbook版本</span></span><br><span class="line">gitbook update <span class="comment">//更新到gitbook的最新版本</span></span><br><span class="line">gitbook uninstall <span class="number">2.0</span><span class="number">.1</span> <span class="comment">//卸载对应的gitbook版本</span></span><br><span class="line">gitbook build –log=debug <span class="comment">//指定log的级别</span></span><br><span class="line">gitbook builid –debug <span class="comment">//输出错误信息</span></span><br><span class="line"></span><br><span class="line">touch README.md SUMMARY.md</span><br><span class="line">git init</span><br><span class="line">git add README.md SUMMARY.md</span><br><span class="line">git commit -m “first commit”</span><br><span class="line">git remote add gitbook https:<span class="comment">//git.gitbook.com/&#123;&#123;UserName&#125;&#125;/&#123;&#123;Book&#125;&#125;.git</span></span><br><span class="line">git push -u gitbook master</span><br><span class="line">git remote add gitbook https:<span class="comment">//git.gitbook.com/&#123;&#123;UserName&#125;&#125;/&#123;&#123;Book&#125;&#125;.git</span></span><br><span class="line">git push -u gitbook master</span><br></pre></td></tr></table></figure>
<h3 id="查询天气"><a href="#查询天气" class="headerlink" title="查询天气"></a>查询天气</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br></pre></td><td class="code"><pre><span class="line">$curl wttr.in\?lang=zh</span><br><span class="line">天氣預報： Beijing, China</span><br><span class="line"></span><br><span class="line">     \   /     晴天</span><br><span class="line">      .-.      <span class="number">-1</span> °C</span><br><span class="line">   ― (   ) ―   ↙ <span class="number">0</span> km/h</span><br><span class="line">      <span class="string">`-’      7 km</span></span><br><span class="line"><span class="string">     /   \     0.0 mm</span></span><br><span class="line"><span class="string">                                                       ┌─────────────┐</span></span><br><span class="line"><span class="string">┌──────────────────────────────┬───────────────────────┤  一 14 1月  ├───────────────────────┬──────────────────────────────┐</span></span><br><span class="line"><span class="string">│             早上             │             中午      └──────┬──────┘       晚間            │              晚              │</span></span><br><span class="line"><span class="string">├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤</span></span><br><span class="line"><span class="string">│     \   /     晴天           │    \  /       局部多云       │    \  /       局部多云       │     \   /     晴朗           │</span></span><br><span class="line"><span class="string">│      .-.      1 °C           │  _ /"".-.     5 °C           │  _ /"".-.     2-4 °C         │      .-.      -4-1 °C        │</span></span><br><span class="line"><span class="string">│   ― (   ) ―   ← 2-3 km/h     │    \_(   ).   ↖ 3-4 km/h     │    \_(   ).   → 10-16 km/h   │   ― (   ) ―   ↘ 25-39 km/h   │</span></span><br><span class="line"><span class="string">│      `</span>-’      <span class="number">20</span> km          │    /(___(__)  <span class="number">20</span> km          │    /(___(__)  <span class="number">20</span> km          │      <span class="string">`-’      20 km          │</span></span><br><span class="line"><span class="string">│     /   \     0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │     /   \     0.0 mm | 0%    │</span></span><br><span class="line"><span class="string">└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘</span></span><br><span class="line"><span class="string">$ curl wttr.in/Beijing</span></span><br><span class="line"><span class="string">$ curl wttr.in/北京</span></span><br><span class="line"><span class="string">$ curl wttr.in/pek # 北京首都国际机场</span></span><br><span class="line"><span class="string">Weather report: pek</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">     \   /     Sunny</span></span><br><span class="line"><span class="string">      .-.      -1 °C</span></span><br><span class="line"><span class="string">   ― (   ) ―   ↙ 0 km/h</span></span><br><span class="line"><span class="string">      `</span>-’      <span class="number">7</span> km</span><br><span class="line">     /   \     <span class="number">0.0</span> mm</span><br><span class="line">                                                       ┌─────────────┐</span><br><span class="line">┌──────────────────────────────┬───────────────────────┤  Mon <span class="number">14</span> Jan ├───────────────────────┬──────────────────────────────┐</span><br><span class="line">│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │</span><br><span class="line">├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤</span><br><span class="line">│     \   /     Sunny          │    \  /       Partly cloudy  │    \  /       Partly cloudy  │     \   /     Clear          │</span><br><span class="line">│      .-.      <span class="number">0</span> °C           │  _ /<span class="string">""</span>.-.     <span class="number">3</span><span class="number">-4</span> °C         │  _ /<span class="string">""</span>.-.     <span class="number">0</span><span class="number">-2</span> °C         │      .-.      <span class="number">-5</span><span class="number">-1</span> °C        │</span><br><span class="line">│   ― (   ) ―   ← <span class="number">3</span><span class="number">-4</span> km/h     │    \_(   ).   ↑ <span class="number">4</span> km/h       │    \_(   ).   ↗ <span class="number">8</span><span class="number">-16</span> km/h    │   ― (   ) ―   ↘ <span class="number">19</span><span class="number">-35</span> km/h   │</span><br><span class="line">│      <span class="string">`-’      20 km          │    /(___(__)  20 km          │    /(___(__)  20 km          │      `</span>-’      <span class="number">20</span> km          │</span><br><span class="line">│     /   \     <span class="number">0.0</span> mm | <span class="number">0</span>%    │               <span class="number">0.0</span> mm | <span class="number">0</span>%    │               <span class="number">0.0</span> mm | <span class="number">0</span>%    │     /   \     <span class="number">0.0</span> mm | <span class="number">0</span>%    │</span><br><span class="line">└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘</span><br><span class="line">                                                       ┌─────────────┐</span><br><span class="line">┌──────────────────────────────┬───────────────────────┤  Tue <span class="number">15</span> Jan ├───────────────────────┬──────────────────────────────┐</span><br><span class="line">│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │</span><br><span class="line">├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤</span><br><span class="line">│     \   /     Sunny          │     \   /     Sunny          │     \   /     Clear          │     \   /     Clear          │</span><br><span class="line">│      .-.      <span class="number">-12</span>-<span class="number">-6</span> °C      │      .-.      <span class="number">-10</span>-<span class="number">-4</span> °C      │      .-.      <span class="number">-4</span>-<span class="number">-1</span> °C       │      .-.      <span class="number">-3</span>-<span class="number">-1</span> °C       │</span><br><span class="line">│   ― (   ) ―   ↘ <span class="number">17</span><span class="number">-23</span> km/h   │   ― (   ) ―   ↘ <span class="number">19</span><span class="number">-22</span> km/h   │   ― (   ) ―   ↘ <span class="number">8</span><span class="number">-10</span> km/h    │   ― (   ) ―   → <span class="number">6</span><span class="number">-7</span> km/h     │</span><br><span class="line">│      <span class="string">`-’      20 km          │      `</span>-’      <span class="number">20</span> km          │      <span class="string">`-’      20 km          │      `</span>-’      <span class="number">20</span> km          │</span><br><span class="line">│     /   \     <span class="number">0.0</span> mm | <span class="number">0</span>%    │     /   \     <span class="number">0.0</span> mm | <span class="number">0</span>%    │     /   \     <span class="number">0.0</span> mm | <span class="number">0</span>%    │     /   \     <span class="number">0.0</span> mm | <span class="number">0</span>%    │</span><br><span class="line">└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘</span><br><span class="line">                                                       ┌─────────────┐</span><br><span class="line">┌──────────────────────────────┬───────────────────────┤  Wed <span class="number">16</span> Jan ├───────────────────────┬──────────────────────────────┐</span><br><span class="line">│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │</span><br><span class="line">├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤</span><br><span class="line">│     \   /     Sunny          │     \   /     Sunny          │    \  /       Partly cloudy  │    \  /       Partly cloudy  │</span><br><span class="line">│      .-.      <span class="number">-5</span>-<span class="number">-3</span> °C       │      .-.      <span class="number">-1</span><span class="number">-1</span> °C        │  _ /<span class="string">""</span>.-.     <span class="number">-2</span>-<span class="number">-1</span> °C       │  _ /<span class="string">""</span>.-.     <span class="number">-3</span>-<span class="number">-2</span> °C       │</span><br><span class="line">│   ― (   ) ―   ↘ <span class="number">4</span><span class="number">-5</span> km/h     │   ― (   ) ―   ↗ <span class="number">5</span><span class="number">-6</span> km/h     │    \_(   ).   ↑ <span class="number">4</span><span class="number">-6</span> km/h     │    \_(   ).   ↘ <span class="number">2</span><span class="number">-4</span> km/h     │</span><br><span class="line">│      <span class="string">`-’      20 km          │      `</span>-’      <span class="number">20</span> km          │    /(___(__)  <span class="number">20</span> km          │    /(___(__)  <span class="number">20</span> km          │</span><br><span class="line">│     /   \     <span class="number">0.0</span> mm | <span class="number">0</span>%    │     /   \     <span class="number">0.0</span> mm | <span class="number">0</span>%    │               <span class="number">0.0</span> mm | <span class="number">0</span>%    │               <span class="number">0.0</span> mm | <span class="number">0</span>%    │</span><br><span class="line">└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘</span><br><span class="line">Location: 北京首都国际机场, 航管南路, 朝阳区 / Chaoyang, 北京市, <span class="number">101312</span>, 中国 [<span class="number">40.07928545</span>,<span class="number">116.594560692</span>]</span><br><span class="line"></span><br><span class="line">Follow @igor_chubin <span class="keyword">for</span> wttr.in updates</span><br><span class="line">$ curl wttr.in/sha # 上海虹桥国际机场</span><br><span class="line">$ curl <span class="string">"wttr.in/Beijing?u"</span></span><br><span class="line">$ curl <span class="string">"wttr.in/Beijing?m"</span></span><br></pre></td></tr></table></figure>
<h3 id="生成各种不同环境下某个网页的截图"><a href="#生成各种不同环境下某个网页的截图" class="headerlink" title="生成各种不同环境下某个网页的截图"></a>生成各种不同环境下某个网页的截图</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">npm i -g screenshoteer</span><br><span class="line">screenshoteer  --url https:<span class="comment">//www.example.com</span></span><br><span class="line"></span><br><span class="line">or .html localy copy the url path <span class="keyword">from</span> the browser</span><br><span class="line"></span><br><span class="line">screenshoteer --url file:<span class="comment">///Users/../index.html</span></span><br><span class="line">screenshoteer --url file:<span class="comment">///C:/Users/../Random-HTML-file.html</span></span><br></pre></td></tr></table></figure>
<h3 id="豆瓣电台命令行版"><a href="#豆瓣电台命令行版" class="headerlink" title="豆瓣电台命令行版"></a>豆瓣电台命令行版</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm i doubanfm -g</span><br><span class="line">doubanfm</span><br></pre></td></tr></table></figure>
<h3 id="不再为文档而发愁"><a href="#不再为文档而发愁" class="headerlink" title="不再为文档而发愁"></a>不再为文档而发愁</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">$ npm install doxmate -g</span><br><span class="line"><span class="comment">// 签出doxmate项目</span></span><br><span class="line">$ git clone git:<span class="comment">//github.com/JacksonTian/doxmate.git ~/git/doxmate</span></span><br><span class="line"><span class="comment">// 去到项目目录</span></span><br><span class="line">$ cd doxmate</span><br><span class="line">$ doxmate build</span><br><span class="line"><span class="comment">// 在docs目录下将会得到文档</span></span><br><span class="line">$ open ~<span class="regexp">/git/</span>doxmate/doc/index.html</span><br><span class="line"><span class="comment">// 或者 -o folder，可以将文档生成到指定的目录下</span></span><br><span class="line">$ doxmate build -o ~<span class="regexp">/output</span></span><br><span class="line"><span class="regexp">/</span><span class="regexp">/ 带上-s参数后，可以选择doxmate提供的几种模板</span></span><br><span class="line"><span class="regexp">$ doxmate build -s wordpress</span></span><br><span class="line"><span class="regexp">/</span><span class="regexp">/卸载</span></span><br><span class="line"><span class="regexp">npm uninstall girlcrawler -g</span></span><br></pre></td></tr></table></figure>
<h3 id="pdf转换"><a href="#pdf转换" class="headerlink" title="pdf转换"></a>pdf转换</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">npm install electron-pdf -g</span><br><span class="line">To generate a PDF <span class="keyword">from</span> a HTML file</span><br><span class="line"></span><br><span class="line">$ electron-pdf index.html ~<span class="regexp">/Desktop/i</span>ndex.pdf</span><br><span class="line"></span><br><span class="line">To generate a PDF <span class="keyword">from</span> a Markdown file</span><br><span class="line"></span><br><span class="line">$ electron-pdf index.md ~<span class="regexp">/Desktop/i</span>ndex.pdf</span><br><span class="line">$ electron-pdf https:<span class="comment">//fraserxu.me ~/Desktop/fraserxu.pdf</span></span><br><span class="line">$ npm install -g html-pdf</span><br><span class="line">$ html-pdf test/businesscard.html businesscard.pdf</span><br></pre></td></tr></table></figure>
<h3 id="mp4转gif"><a href="#mp4转gif" class="headerlink" title="mp4转gif"></a>mp4转gif</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">npm install -g gifify</span><br><span class="line">gifify back.mp4 -o back.gif --<span class="keyword">from</span> <span class="number">01</span>:<span class="number">48</span>:<span class="number">23.200</span> --to <span class="number">01</span>:<span class="number">48</span>:<span class="number">25.300</span> --text <span class="string">"What?..What?What?"</span></span><br><span class="line">gifify <span class="number">22.</span>mkv -o movie.gif --subtitles <span class="number">22.</span>ass --<span class="keyword">from</span> <span class="number">1995</span> --to <span class="number">2002</span> --resize <span class="number">600</span>:<span class="number">-1</span></span><br><span class="line">gifify screencast.mkv -o screencast.gif --resize <span class="number">800</span>:<span class="number">-1</span></span><br></pre></td></tr></table></figure>
<h3 id="系统面板"><a href="#系统面板" class="headerlink" title="系统面板"></a>系统面板</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ npm install gtop -g</span><br><span class="line">$ gtop</span><br></pre></td></tr></table></figure>
<h3 id="gitbook"><a href="#gitbook" class="headerlink" title="gitbook"></a>gitbook</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ npm install gitbook-cli -g</span><br><span class="line">$ gitbook init</span><br><span class="line">$ gitbook serve</span><br><span class="line">$ gitbook build</span><br></pre></td></tr></table></figure>
<h3 id="个人脚本管理工具"><a href="#个人脚本管理工具" class="headerlink" title="个人脚本管理工具"></a>个人脚本管理工具</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">$ npm install helloshell -g</span><br><span class="line">$ git clone https:<span class="comment">//github.com/wl879/HelloShell.git</span></span><br><span class="line">$ chmod <span class="number">777</span> ./HelloShell/main.py</span><br><span class="line">$ ln -s <span class="string">"$(pwd)/HelloShell/main.py"</span> /usr/local/bin/helloshell</span><br><span class="line">$ helloshell <span class="keyword">new</span> name [-l [name]]</span><br></pre></td></tr></table></figure>
<h3 id="静态博客"><a href="#静态博客" class="headerlink" title="静态博客"></a>静态博客</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ npm install hexo-cli -g</span><br><span class="line">$ hexo init blog</span><br><span class="line">$ cd blog</span><br><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<h3 id="rest-api-json"><a href="#rest-api-json" class="headerlink" title="rest api json"></a>rest api json</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g json-server</span><br><span class="line">Create a db.json file</span><br><span class="line"></span><br><span class="line">&#123;</span><br><span class="line">  <span class="string">"posts"</span>: [</span><br><span class="line">    &#123; <span class="string">"id"</span>: <span class="number">1</span>, <span class="string">"title"</span>: <span class="string">"json-server"</span>, <span class="string">"author"</span>: <span class="string">"typicode"</span> &#125;</span><br><span class="line">  ],</span><br><span class="line">  <span class="string">"comments"</span>: [</span><br><span class="line">    &#123; <span class="string">"id"</span>: <span class="number">1</span>, <span class="string">"body"</span>: <span class="string">"some comment"</span>, <span class="string">"postId"</span>: <span class="number">1</span> &#125;</span><br><span class="line">  ],</span><br><span class="line">  <span class="string">"profile"</span>: &#123; <span class="string">"name"</span>: <span class="string">"typicode"</span> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">Start <span class="built_in">JSON</span> Server</span><br><span class="line"></span><br><span class="line">$ json-server --watch db.json</span><br><span class="line"></span><br><span class="line">Now <span class="keyword">if</span> you go to http:<span class="comment">//localhost:3000/posts/1, you'll get</span></span><br><span class="line"></span><br><span class="line">&#123; <span class="string">"id"</span>: <span class="number">1</span>, <span class="string">"title"</span>: <span class="string">"json-server"</span>, <span class="string">"author"</span>: <span class="string">"typicode"</span> &#125;</span><br></pre></td></tr></table></figure>
<h3 id="md预览"><a href="#md预览" class="headerlink" title="md预览"></a>md预览</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">$ npm i koy -g</span><br><span class="line">$ koy</span><br><span class="line"> </span><br><span class="line"># Or a specific file </span><br><span class="line">$ koy some-file.md</span><br><span class="line"> </span><br><span class="line"># Or a README.md in Github repo </span><br><span class="line">$ koy gh:djyde/koy</span><br><span class="line"> </span><br><span class="line"># Or a README.md in NPM </span><br><span class="line">$ koy npm:koy</span><br></pre></td></tr></table></figure>
<h3 id="Web-开发调试工具"><a href="#Web-开发调试工具" class="headerlink" title="Web 开发调试工具"></a>Web 开发调试工具</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install livepool -g</span><br><span class="line">livepool</span><br></pre></td></tr></table></figure>
<h3 id="下载在线音乐歌词"><a href="#下载在线音乐歌词" class="headerlink" title="下载在线音乐歌词"></a>下载在线音乐歌词</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">npm install lyric-dl -g</span><br><span class="line">npm update lyric-dl -g</span><br><span class="line">lyric-dl download &lt;url&gt; --out-format json</span><br><span class="line">lyric-dl search &lt;name&gt;</span><br></pre></td></tr></table></figure>
<h3 id="控制台登录pc浏览器"><a href="#控制台登录pc浏览器" class="headerlink" title="控制台登录pc浏览器"></a>控制台登录pc浏览器</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install -g m-<span class="built_in">console</span></span><br><span class="line">mcon server</span><br></pre></td></tr></table></figure>
<h3 id="屏幕截图"><a href="#屏幕截图" class="headerlink" title="屏幕截图"></a>屏幕截图</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">npm install -g slimerjs</span><br><span class="line">npm install -g phantomjs</span><br><span class="line">npm install -g phantomjs2</span><br><span class="line">npm install -g manet</span><br><span class="line">manet</span><br></pre></td></tr></table></figure>
<h3 id="公众号文章抓取"><a href="#公众号文章抓取" class="headerlink" title="公众号文章抓取"></a>公众号文章抓取</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">npm i mpspider -g</span><br><span class="line"># 第一种方式 </span><br><span class="line">mpspider url https:<span class="comment">//mp.weixin.qq.com/s/CIPosICgva9haqstMDIHag -d dest_path</span></span><br><span class="line"># 第二种方式，需要手动配置代理，点击公众号「查看历史文章」，详见下面介绍 </span><br><span class="line">mpspider proxy -d dest_path -p proxy_port</span><br><span class="line"></span><br><span class="line"># 进入抓取后gitbook的地址 </span><br><span class="line">cd dest_path</span><br><span class="line"># 创建readme.md，gitbook不创建会报错 </span><br><span class="line">touch README.md</span><br><span class="line"># 有必要可以创建book.json，参考gitbook文档 </span><br><span class="line">gitbook serve</span><br><span class="line"># 访问地址查看效果 </span><br><span class="line">#npm i gitbook-cli -g</span><br><span class="line"># 生成电子书 </span><br><span class="line">gitbook mobi ./ name.mobi</span><br><span class="line"></span><br><span class="line"> anyproxy --rule lib/anyproxyRule.js</span><br></pre></td></tr></table></figure>
<h3 id="网页打包"><a href="#网页打包" class="headerlink" title="网页打包"></a>网页打包</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">npm install nativefier -g</span><br><span class="line"> nativefier.cmd <span class="string">"http://github.com"</span></span><br><span class="line">Downloading tmp<span class="number">-19012</span><span class="number">-1</span>-SHASUMS256.txt<span class="number">-3.0</span><span class="number">.3</span></span><br><span class="line">[============================================&gt;] <span class="number">100.0</span>% <span class="keyword">of</span> <span class="number">4.74</span> kB (<span class="number">4.74</span> kB/s)</span><br><span class="line">Packaging app <span class="keyword">for</span> platform win32 x64 using electron v3<span class="number">.0</span><span class="number">.3</span></span><br></pre></td></tr></table></figure>
<h3 id="nodeppt"><a href="#nodeppt" class="headerlink" title="nodeppt"></a>nodeppt</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br></pre></td><td class="code"><pre><span class="line">npm install -g nodeppt</span><br><span class="line"># 获取帮助 </span><br><span class="line">nodeppt start -h</span><br><span class="line"># 绑定端口 </span><br><span class="line">nodeppt start -p &lt;port&gt;</span><br><span class="line"></span><br><span class="line">nodeppt start -p <span class="number">8090</span> -d path/<span class="keyword">for</span>/ppts</span><br><span class="line"># 绑定host，默认绑定0.0.0.0 </span><br><span class="line">nodeppt start -p <span class="number">8080</span> -d path/<span class="keyword">for</span>/ppts -H <span class="number">127.0</span><span class="number">.0</span><span class="number">.1</span></span><br><span class="line"># 使用socket通信（按Q键显示/关闭二维码，手机扫描，即可控制） </span><br><span class="line"># socket须知：1、注意手机和pc要可以相互访问，2、防火墙，3、ip </span><br><span class="line"># 获取generate帮助 </span><br><span class="line">nodeppt generate -h</span><br><span class="line"># 使用generate命令 </span><br><span class="line">nodeppt generate filepath</span><br><span class="line"># 导出全部，包括nodeppt的js、img和css文件夹 </span><br><span class="line"># 默认导出在publish文件夹 </span><br><span class="line">nodeppt generate ./ppts/demo.md -a</span><br><span class="line"># 指定导出文件夹 </span><br><span class="line">nodeppt generate ./ppts/demo.md output/path -a</span><br><span class="line"></span><br><span class="line"># create a new slide with an official template</span><br><span class="line">$ nodeppt <span class="keyword">new</span> slide.md</span><br><span class="line"></span><br><span class="line"># create a new slide straight from a github template</span><br><span class="line">$ nodeppt <span class="keyword">new</span> slide.md -t username/repo</span><br><span class="line"></span><br><span class="line"># start local sever show slide</span><br><span class="line">$ nodeppt serve slide.md</span><br><span class="line"> </span><br><span class="line"> INFO  Starting development server...</span><br><span class="line"> <span class="number">98</span>% after emitting DONE  Compiled successfully <span class="keyword">in</span> <span class="number">4588</span>ms19:<span class="number">44</span>:<span class="number">58</span>              s</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  NodePPT running at:</span><br><span class="line">  - Url: http:<span class="comment">//10.235.51.39:8080/</span></span><br><span class="line">  - Speaker Mode: http:<span class="comment">//10.235.51.39:8080/?mode=speaker</span></span><br><span class="line"></span><br><span class="line"># to build a slide</span><br><span class="line">$ nodeppt build slide.md</span><br></pre></td></tr></table></figure>
<h3 id="网页转图片"><a href="#网页转图片" class="headerlink" title="网页转图片"></a>网页转图片</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">npm i page2image --global</span><br><span class="line"># Single page </span><br><span class="line">&gt; page2image https:<span class="comment">//github.com/Runjuu --type=jpeg --quality=80</span></span><br><span class="line"> </span><br><span class="line"># Multi-page </span><br><span class="line">&gt; page2image https:<span class="comment">//github.com/Runjuu https://github.com/Runjuu --type=jpeg --quality=80</span></span><br><span class="line"> </span><br><span class="line"># Local file </span><br><span class="line">&gt; page2image ./index.html --type=jpeg --quality=<span class="number">80</span></span><br><span class="line">page2image https:<span class="comment">//github.com/Runjuu --selector=".js-contribution-graph"</span></span><br></pre></td></tr></table></figure>
<h3 id="汉字拼音转换"><a href="#汉字拼音转换" class="headerlink" title="汉字拼音转换"></a>汉字拼音转换</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">npm install pinyin -g</span><br><span class="line">$ pinyin 中心</span><br><span class="line">zhōng xīn</span><br><span class="line">$ pinyin -h</span><br></pre></td></tr></table></figure>
<h3 id="md-ppt"><a href="#md-ppt" class="headerlink" title="md ppt"></a>md ppt</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">ppt file.md </span><br><span class="line"></span><br><span class="line">ppt a.md --theme=black --transition=zoom</span><br><span class="line"></span><br><span class="line">ppt https:<span class="comment">//raw.githubusercontent.com/jirengu/server-mock/master/README.md</span></span><br><span class="line">Listening on port <span class="number">8080.</span> open http:<span class="comment">//localhost:8080/README.html</span></span><br></pre></td></tr></table></figure>
<h3 id="实时编辑刷新的前端服务器"><a href="#实时编辑刷新的前端服务器" class="headerlink" title="实时编辑刷新的前端服务器"></a>实时编辑刷新的前端服务器</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm -g install puer</span><br><span class="line">cd /path/to/workspace ↵</span><br><span class="line">puer</span><br></pre></td></tr></table></figure>
<h3 id="二维码"><a href="#二维码" class="headerlink" title="二维码"></a>二维码</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g qrcode-terminal</span><br><span class="line">$ qrcode-terminal --help</span><br><span class="line">$ qrcode-terminal <span class="string">'http://github.com'</span></span><br><span class="line">$ echo <span class="string">'http://github.com'</span> | qrcode-terminal</span><br></pre></td></tr></table></figure>
<h3 id="静态站点生成器"><a href="#静态站点生成器" class="headerlink" title="静态站点生成器"></a>静态站点生成器</h3><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">npm install rdoc -g</span><br><span class="line">rdoc init my-project</span><br><span class="line"></span><br><span class="line">cd my-project &amp;&amp; npm install # Install dependencies. </span><br><span class="line">npm start # Into the directory, start the service.</span><br></pre></td></tr></table></figure>
<h3 id="网络测速"><a href="#网络测速" class="headerlink" title="网络测速"></a>网络测速</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">npm install --global speed-test</span><br><span class="line">speed-test.cmd</span><br><span class="line"></span><br><span class="line">       Ping   <span class="number">13</span> ms</span><br><span class="line">   Download   <span class="number">48</span> Mbps</span><br><span class="line">     Upload   <span class="number">24</span> Mbps</span><br></pre></td></tr></table></figure>
<h3 id="运行SQL查询并可视化结果"><a href="#运行SQL查询并可视化结果" class="headerlink" title="运行SQL查询并可视化结果"></a>运行SQL查询并可视化结果</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"> npm install -g sqlpad#http://rickbergfalk.github.io/sqlpad/</span><br><span class="line">sqlpad --dir ./sqlpaddata --ip <span class="number">127.0</span><span class="number">.0</span><span class="number">.1</span> --port <span class="number">3000</span> --passphrase secr3t</span><br><span class="line"> optional driver ../drivers/unixodbc not available</span><br><span class="line"> </span><br><span class="line"> Welcome to SQLPad!. Visit http:<span class="comment">//127.0.0.1:3000 to get started</span></span><br><span class="line"> </span><br><span class="line"> docker-compose up -d</span><br></pre></td></tr></table></figure>
<h3 id="检查网站堆栈"><a href="#检查网站堆栈" class="headerlink" title="检查网站堆栈"></a>检查网站堆栈</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ npm install stacks-cli -g</span><br><span class="line">$ stacks-cli</span><br></pre></td></tr></table></figure>
<h3 id="种子"><a href="#种子" class="headerlink" title="种子"></a>种子</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install -g t-get</span><br><span class="line">tget <span class="string">'magnet:?xt=urn:btih:0403fb4728bd788fbcb67e87d6feb241ef38c75a'</span></span><br></pre></td></tr></table></figure>
<h3 id="命令行提示"><a href="#命令行提示" class="headerlink" title="命令行提示"></a>命令行提示</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">npm install -g tldr#类似cheat</span><br><span class="line">λ tldr curl</span><br><span class="line">√ Page not found. Updating cache</span><br><span class="line">√ Creating index</span><br><span class="line"></span><br><span class="line">  curl</span><br><span class="line"></span><br><span class="line">  Transfers data <span class="keyword">from</span> or to a server.</span><br><span class="line">  Supports most protocols, including HTTP, FTP, and POP3.</span><br><span class="line"></span><br><span class="line">  - Download the contents <span class="keyword">of</span> an URL to a file:</span><br><span class="line">    curl http:<span class="comment">//example.com -o filename</span></span><br><span class="line"></span><br><span class="line">  - Download a file, saving the output under the filename indicated by the URL:</span><br><span class="line">    curl -O http:<span class="comment">//example.com/filename</span></span><br><span class="line"></span><br><span class="line">  - Download a file, following [L]ocation redirects, and automatically [C]ontinuing (resuming) a previous file transfer:</span><br><span class="line">    curl -O -L -C - http:<span class="comment">//example.com/filename</span></span><br></pre></td></tr></table></figure>
<h3 id="以太坊的开发环境"><a href="#以太坊的开发环境" class="headerlink" title="以太坊的开发环境"></a>以太坊的开发环境</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g truffle</span><br><span class="line">$ truffle init</span><br></pre></td></tr></table></figure>
<h3 id="流媒体客户端"><a href="#流媒体客户端" class="headerlink" title="流媒体客户端"></a>流媒体客户端</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install webtorrent-cli -g</span><br><span class="line">$ webtorrent magnet_uri</span><br></pre></td></tr></table></figure>
<h3 id="wtfjs"><a href="#wtfjs" class="headerlink" title="wtfjs"></a>wtfjs</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g wtfjs</span><br></pre></td></tr></table></figure>
<h3 id="wtfpython"><a href="#wtfpython" class="headerlink" title="wtfpython"></a>wtfpython</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g wtfpython</span><br><span class="line">$ pip install wtfpython -U</span><br></pre></td></tr></table></figure>
<h3 id="前端模拟用工具"><a href="#前端模拟用工具" class="headerlink" title="前端模拟用工具"></a>前端模拟用工具</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm i -g xmocker-cli</span><br><span class="line">λ mocker start</span><br><span class="line">后台管理界面运行于: http:<span class="comment">//localhost:6001 耗时： 607 ms</span></span><br></pre></td></tr></table></figure>
<h3 id="MySql数据库生成REST-API"><a href="#MySql数据库生成REST-API" class="headerlink" title="MySql数据库生成REST API"></a>MySql数据库生成REST API</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">npm install -g xmysql</span><br><span class="line"> xmysql.cmd -h localhost -u root -p root -d laravel</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">          Generating REST APIs at the speed <span class="keyword">of</span> your thought..</span><br><span class="line"></span><br><span class="line"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span><br><span class="line"></span><br><span class="line">          Database              :    laravel</span><br><span class="line">          <span class="built_in">Number</span> <span class="keyword">of</span> Tables      :    <span class="number">19</span></span><br><span class="line"></span><br><span class="line">          REST APIs Generated   :    <span class="number">370</span></span><br><span class="line"></span><br><span class="line">          Xmysql took           :    <span class="number">0.9</span> seconds</span><br><span class="line">          API<span class="string">'s base URL        :    localhost:3000</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span></span><br><span class="line"><span class="string">GET / 200 29908 - 8.113 ms</span></span><br><span class="line"><span class="string">GET /api/admin_menu/describe 200 708 - 49.192 ms</span></span><br></pre></td></tr></table></figure>
<h3 id="检查基金收入"><a href="#检查基金收入" class="headerlink" title="检查基金收入"></a>检查基金收入</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">npm install xxb -g</span><br><span class="line">λ xxb</span><br><span class="line">info xxb is running. Press Ctrl+C to stop</span><br><span class="line">WARN Can<span class="string">'t find ~/.xxb file, using default configuration</span></span><br><span class="line"><span class="string">┌──────────────┬─────────────────────────────┬────────────┬───────────────┬──────────┐</span></span><br><span class="line"><span class="string">│ 产品名称     │ 合作基金                    │ 发售平台   │ 7日年化收益率 │ 万份收益 │</span></span><br><span class="line"><span class="string">├──────────────┼─────────────────────────────┼────────────┼───────────────┼──────────┤</span></span><br><span class="line"><span class="string">│ 零钱宝       │ 汇添富现金宝货币(000330)    │ 苏宁       │ 3.3710%       │ 0.8838元 │</span></span><br><span class="line"><span class="string">├──────────────┼─────────────────────────────┼────────────┼───────────────┼──────────┤</span></span><br><span class="line"><span class="string">│ 现金宝       │ 汇添富现金宝货币(000330)    │ 网易理财   │ 3.3710%       │ 0.8838元 │</span></span><br><span class="line"><span class="string">├──────────────┼─────────────────────────────┼────────────┼───────────────┼──────────┤</span></span><br><span class="line"><span class="string">│ 财富宝       │ 华夏财富宝货币A(000343)     │ 微信理财通 │ 3.2740%       │ 0.8739元 │</span></span><br><span class="line"><span class="string">├──────────────┼─────────────────────────────┼────────────┼───────────────┼──────────┤</span></span><br><span class="line"><span class="string">│ 全额宝       │ 汇添富全额宝货币(000397)    │ 微信理财通 │ 3.0730%       │ 0.8303元 │</span></span><br><span class="line"><span class="string">├──────────────┼─────────────────────────────┼────────────┼───────────────┼──────────┤</span></span><br><span class="line"><span class="string">│ 百赚利滚利版 │ 嘉实活期宝货币(000464)      │ 百度理财   │ 3.1290%       │ 0.8280元 │</span></span><br><span class="line"><span class="string">├──────────────┼─────────────────────────────┼────────────┼───────────────┼──────────┤</span></span><br><span class="line"><span class="string">│ 百赚         │ 华夏现金增利货币A/E(003003) │ 百度理财   │ 3.0950%       │ 0.8093元 │</span></span><br><span class="line"><span class="string">├──────────────┼─────────────────────────────┼────────────┼───────────────┼──────────┤</span></span><br><span class="line"><span class="string">│ 零钱宝       │ 广发天天红货币A(000389)     │ 苏宁       │ 2.8420%       │ 0.7621元 │</span></span><br><span class="line"><span class="string">├──────────────┼─────────────────────────────┼────────────┼───────────────┼──────────┤</span></span><br><span class="line"><span class="string">│ 余额宝       │ 天弘余额宝货币(000198)      │ 支付宝     │ 2.5260%       │ 0.6881元 │</span></span><br><span class="line"><span class="string">└──────────────┴─────────────────────────────┴────────────┴───────────────┴──────────┘</span></span><br></pre></td></tr></table></figure>
<h3 id="静态文件服务器"><a href="#静态文件服务器" class="headerlink" title="静态文件服务器"></a>静态文件服务器</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">npm install anywhere -g</span><br><span class="line">$ anywhere</span><br><span class="line"><span class="comment">// or with port</span></span><br><span class="line">$ anywhere -p <span class="number">8000</span></span><br><span class="line"><span class="comment">// or start it but silent(don't open browser)</span></span><br><span class="line">$ anywhere -s</span><br><span class="line"><span class="comment">// or with hostname</span></span><br><span class="line">$ anywhere -h localhost -p <span class="number">8888</span></span><br><span class="line"><span class="comment">// or with folder</span></span><br><span class="line">$ anywhere -d ~<span class="regexp">/git/</span>anywhere</span><br><span class="line"><span class="comment">// or enable html5 history</span></span><br><span class="line">$ anywhere -f /index.html</span><br><span class="line">npm install -g serve</span><br><span class="line"> serve</span><br><span class="line"></span><br><span class="line">   ┌──────────────────────────────────────────────────┐</span><br><span class="line">   │                                                  │</span><br><span class="line">   │   Serving!                                       │</span><br><span class="line">   │                                                  │</span><br><span class="line">   │   - Local:            http:<span class="comment">//localhost:5000      │</span></span><br><span class="line">   │   - On Your Network:  http:<span class="comment">//10.235.51.43:5000   │</span></span><br><span class="line">   │                                                  │</span><br><span class="line">   │   Copied local address to clipboard!</span><br></pre></td></tr></table></figure>
<h3 id="图片识别"><a href="#图片识别" class="headerlink" title="图片识别"></a>图片识别</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">npm install baidu-ocr-api -g</span><br><span class="line"> </span><br><span class="line">ocr --help</span><br><span class="line"> </span><br><span class="line">＃  远程图片 </span><br><span class="line">ocr http:<span class="comment">//7pun4e.com1.z0.glb.clouddn.com/test.jpg</span></span><br><span class="line"> </span><br><span class="line">＃  本地图片 </span><br><span class="line">ocr ./test.jpg</span><br></pre></td></tr></table></figure>
<h3 id="翻译"><a href="#翻译" class="headerlink" title="翻译"></a>翻译</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">$ npm install fanyi -g</span><br><span class="line">$ fanyi <span class="string">"make love"</span></span><br><span class="line"></span><br><span class="line">-</span><br><span class="line"> make love  ~  fanyi.youdao.com</span><br><span class="line"></span><br><span class="line"> - v. 做爱；示爱（献殷勤）</span><br><span class="line"></span><br><span class="line"> <span class="number">1.</span> make love</span><br><span class="line">    做爱,制造浪漫,作爱</span><br><span class="line"> <span class="number">2.</span> Make Someone Love You</span><br><span class="line">    迫使别人喜欢自己</span><br><span class="line"> <span class="number">3.</span> Make up love</span><br><span class="line">    配制爱情</span><br></pre></td></tr></table></figure>
<h3 id="镜像管理"><a href="#镜像管理" class="headerlink" title="镜像管理"></a>镜像管理</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g nrm</span><br><span class="line">$ nrm ls</span><br><span class="line"></span><br><span class="line">  npm ---- https:<span class="comment">//registry.npmjs.org/</span></span><br><span class="line">  cnpm --- http:<span class="comment">//r.cnpmjs.org/</span></span><br><span class="line">* taobao - https:<span class="comment">//registry.npm.taobao.org/</span></span><br><span class="line">  nj ----- https:<span class="comment">//registry.nodejitsu.com/</span></span><br><span class="line">  rednpm - http:<span class="comment">//registry.mirror.cqupt.edu.cn/</span></span><br><span class="line">  npmMirror  https:<span class="comment">//skimdb.npmjs.com/registry/</span></span><br><span class="line">  edunpm - http:<span class="comment">//registry.enpmjs.org/</span></span><br><span class="line">$ nrm use cnpm  <span class="comment">//switch registry to cnpm</span></span><br><span class="line"></span><br><span class="line">    Registry has been set to: http:<span class="comment">//r.cnpmjs.org/</span></span><br></pre></td></tr></table></figure>
<h3 id="将纯文本转换为ascii"><a href="#将纯文本转换为ascii" class="headerlink" title="将纯文本转换为ascii"></a>将纯文本转换为ascii</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">npm install -g asciify</span><br><span class="line"></span><br><span class="line">asciify <span class="string">"Boom"</span> -f larry3d</span><br><span class="line"> ____                                   </span><br><span class="line">/\  _<span class="string">`\                                 </span></span><br><span class="line"><span class="string">\ \ \L\ \    ___     ___     ___ ___    </span></span><br><span class="line"><span class="string"> \ \  _ &lt;'  / __`</span>\  / __<span class="string">`\ /' __`</span> __<span class="string">`\  </span></span><br><span class="line"><span class="string">  \ \ \L\ \/\ \L\ \/\ \L\ \/\ \/\ \/\ \ </span></span><br><span class="line"><span class="string">   \ \____/\ \____/\ \____/\ \_\ \_\ \_\</span></span><br><span class="line"><span class="string">    \/___/  \/___/  \/___/  \/_/\/_/\/_/</span></span><br></pre></td></tr></table></figure>
<h3 id="进程管理"><a href="#进程管理" class="headerlink" title="进程管理"></a>进程管理</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ npm install pm2 -g</span><br><span class="line">$ pm2 start app.js</span><br><span class="line">$ pm2 list</span><br></pre></td></tr></table></figure>
<h3 id="版本管理器-n"><a href="#版本管理器-n" class="headerlink" title="版本管理器 n"></a>版本管理器 n</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g n</span><br><span class="line">$ n stable (安装最新的稳定版)</span><br><span class="line">$ n latest (安装最新版本)</span><br><span class="line">$ n lts (安装长期支持版本，一般会 LTS 版)</span><br><span class="line">$ n (显示已安装版本并选择)</span><br><span class="line">#切换8.9.4版</span><br><span class="line">$ n bin <span class="number">8.9</span><span class="number">.4</span></span><br><span class="line">/usr/local/n/versions/node/<span class="number">8.9</span><span class="number">.4</span>/bin/node (获得路径)</span><br><span class="line">vi /etc/profile</span><br><span class="line"></span><br><span class="line">按 i 进入 Insert 模式，在末尾添加</span><br><span class="line"></span><br><span class="line"># nodejs PATH</span><br><span class="line"><span class="keyword">export</span> NODE_HOME=<span class="regexp">/usr/</span>local/n/versions/node/<span class="number">8.9</span><span class="number">.4</span></span><br><span class="line"><span class="keyword">export</span> PATH=$NODE_HOME/bin:$PATH</span><br><span class="line"></span><br><span class="line">按 ESC 退出 Insert 模式，输入 :wq 回车保存并退出</span><br><span class="line"></span><br><span class="line">$ source /etc/profile</span><br></pre></td></tr></table></figure>
<h3 id="find替代方案"><a href="#find替代方案" class="headerlink" title="find替代方案"></a>find替代方案</h3><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">https:<span class="comment">//linux.cn/article-10171-1.html https://github.com/chinanf-boy/fd-zh</span></span><br><span class="line">$ fd cli # 所有包含 "cli" 的文件名</span><br><span class="line">$ fd -e md # 所有以 .md 作为扩展名的文件</span><br><span class="line">$ fd cli -x wc -w # 搜索 "cli" 并且在每个搜索结果上运行 `wc -w`</span><br></pre></td></tr></table></figure>
<h3 id="jq"><a href="#jq" class="headerlink" title="jq"></a>jq</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">https:<span class="comment">//github.com/stedolan/jq</span></span><br><span class="line">$ npm i $(echo $(\</span><br><span class="line">    npm outdated --json | \</span><br><span class="line">    jq -r <span class="string">'to_entries | .[] | "\(.key)@\(.value.latest)"'</span> \</span><br><span class="line">))</span><br></pre></td></tr></table></figure>
<h3 id="json"><a href="#json" class="headerlink" title="json"></a>json</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//https://github.com/antonmedv/fx</span></span><br><span class="line">$ npm install -g fx</span><br><span class="line">$ fx data.json</span><br><span class="line">$ curl ... | fx <span class="string">'json =&gt; json.message'</span></span><br><span class="line">$ curl ... | fx <span class="string">'_.groupBy("commit.committer.name")'</span> <span class="string">'_.mapValues(_.size)'</span></span><br><span class="line">$ echo <span class="string">'&#123;"count": 0&#125;'</span> | fx <span class="string">'&#123;...this, count: 1&#125;'</span></span><br><span class="line">&#123;</span><br><span class="line">  <span class="string">"count"</span>: <span class="number">1</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="查看-Git-文件变动历史"><a href="#查看-Git-文件变动历史" class="headerlink" title="查看 Git 文件变动历史"></a>查看 Git 文件变动历史</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">https:<span class="comment">//github.com/pomber/git-history</span></span><br><span class="line">文件地址 https:<span class="comment">//github.com/babel/babel/blob/master/packages/babel-core/test/browserify.js</span></span><br><span class="line">将域名github.com 改为github.githistory.xyz</span><br><span class="line">https:<span class="comment">//github.githistory.xyz/babel/babel/blob/master/packages/babel-core/test/browserify.js</span></span><br><span class="line">$ npm install -g git-file-history</span><br><span class="line">$ git-file-history path/to/file.ext</span><br><span class="line">Running at http:<span class="comment">//localhost:3000</span></span><br><span class="line"></span><br><span class="line">npx git-file-history path/to/file.ext</span><br><span class="line">npx: installed <span class="number">1</span> <span class="keyword">in</span> <span class="number">2.406</span>s</span><br><span class="line">Path must be a string. Received <span class="literal">undefined</span></span><br><span class="line">C:\Users\xxx\AppData\Roaming\npm\node_modules\git-file-history\cli.js</span><br><span class="line">Running at http:<span class="comment">//localhost:3000</span></span><br></pre></td></tr></table></figure>
<h3 id="中文加空格"><a href="#中文加空格" class="headerlink" title="中文加空格"></a>中文加空格</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"> npm install -g pangu</span><br><span class="line">C:\Users\xxx\AppData\Roaming\npm\pangu -&gt; C:\Users\xxx\AppData\Roaming\npm\node_modules\pangu\dist\node\cli.js</span><br><span class="line">+ pangu@<span class="number">4.0</span><span class="number">.7</span></span><br><span class="line">added <span class="number">1</span> package <span class="keyword">in</span> <span class="number">3.207</span>s</span><br><span class="line">pangu <span class="string">"不能信任那些Terminal或Editor用白底的人"</span></span><br><span class="line">不能信任那些 Terminal 或 Editor 用白底的人</span><br></pre></td></tr></table></figure>
<h3 id="网页截图"><a href="#网页截图" class="headerlink" title="网页截图"></a>网页截图</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">λ npm install --global capture-website-cli</span><br><span class="line">C:\Users\xxx\AppData\Roaming\npm\capture-website -&gt; C:\Users\xxx\AppData\Roaming\npm\node_modules\capture-website-cli\cli.js</span><br><span class="line"></span><br><span class="line">&gt; puppeteer@<span class="number">1.12</span><span class="number">.2</span> install C:\Users\xxx\AppData\Roaming\npm\node_modules\capture-website-cli\node_modules\puppeteer</span><br><span class="line">&gt; node install.js</span><br><span class="line"></span><br><span class="line">Downloading Chromium r624492 - <span class="number">140.5</span> Mb [====================] <span class="number">100</span>% <span class="number">0.0</span>s</span><br><span class="line">Chromium downloaded to C:\Users\xxx\AppData\Roaming\npm\node_modules\capture-website-cli\node_modules\puppeteer\.local-chromium\win64<span class="number">-624492</span></span><br><span class="line">+ capture-website-cli@<span class="number">0.1</span><span class="number">.1</span></span><br><span class="line">added <span class="number">98</span> packages <span class="keyword">in</span> <span class="number">37.927</span>s</span><br><span class="line">capture-website https:<span class="comment">//baidu.com baidu.png</span></span><br><span class="line">capture-website test.html test.png</span><br></pre></td></tr></table></figure>
<h3 id="stackoverflow-from-the-terminal"><a href="#stackoverflow-from-the-terminal" class="headerlink" title="stackoverflow from the terminal"></a>stackoverflow from the terminal</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">npm install -g how-2 #https://github.com/santinic/how2</span><br><span class="line">how2 unzip</span><br><span class="line"></span><br><span class="line">For example, you could alias the proxy seetings <span class="keyword">in</span> your ~<span class="regexp">/.bash_profile:</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">alias how2="HTTPS_PROXY='your_proxy:8888' how2"</span></span><br></pre></td></tr></table></figure>
<h3 id="ppt转图片"><a href="#ppt转图片" class="headerlink" title="ppt转图片"></a>ppt转图片</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//http://blog.51yip.com/jsjquery/1924.html</span></span><br><span class="line">apt install nodejs npm unoconv libreoffice-dev imagemagick  </span><br><span class="line"># nodejs init  //产生package.json  </span><br><span class="line"># npm install ppt2png  </span><br><span class="line">root@bacon-PC:~# cat test.js  </span><br><span class="line"><span class="keyword">var</span> ppt2png = <span class="built_in">require</span>(<span class="string">'ppt2png'</span>);  </span><br><span class="line"><span class="keyword">var</span> ppt = process.argv[<span class="number">2</span>];  </span><br><span class="line"><span class="keyword">var</span> topath = process.argv[<span class="number">3</span>];  </span><br><span class="line">ppt2png(ppt, topath, <span class="function"><span class="keyword">function</span>(<span class="params"> err </span>)</span>&#123;  </span><br><span class="line">    <span class="keyword">if</span>(err) &#123;  </span><br><span class="line">        <span class="built_in">console</span>.log(err);  </span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;  </span><br><span class="line">        <span class="built_in">console</span>.log(<span class="string">'convert successful.'</span>);  </span><br><span class="line">    &#125;  </span><br><span class="line">&#125;);  </span><br><span class="line"># nodejs test.js test.pptx ./test/hao  </span><br><span class="line">convert successful.  </span><br><span class="line">  </span><br><span class="line"># ls ./test |grep hao  </span><br><span class="line">hao<span class="number">-0.</span>png  </span><br><span class="line">hao<span class="number">-10.</span>png  </span><br><span class="line">hao<span class="number">-11.</span>png  </span><br><span class="line">hao<span class="number">-12.</span>png  </span><br><span class="line">hao<span class="number">-13.</span>png  </span><br><span class="line">hao<span class="number">-14.</span>png  </span><br><span class="line">hao<span class="number">-15.</span>png  </span><br><span class="line">hao<span class="number">-16.</span>png  </span><br><span class="line">hao<span class="number">-17.</span>png  </span><br><span class="line">hao<span class="number">-1.</span>png  </span><br><span class="line">hao<span class="number">-2.</span>png  </span><br><span class="line">hao<span class="number">-3.</span>png  </span><br><span class="line">hao<span class="number">-4.</span>png  </span><br><span class="line">hao<span class="number">-5.</span>png  </span><br><span class="line">hao<span class="number">-6.</span>png  </span><br><span class="line">hao<span class="number">-7.</span>png  </span><br><span class="line">hao<span class="number">-8.</span>png  </span><br><span class="line">hao<span class="number">-9.</span>png</span><br></pre></td></tr></table></figure>
<h3 id="FFmpeg"><a href="#FFmpeg" class="headerlink" title="FFmpeg"></a>FFmpeg</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">ffmpeg -i imput.mkv -c:v libx264 output.mp4</span><br><span class="line">查看视频文件的流信息，包括视频、音频、字幕。</span><br><span class="line">ffmpeg -i input.mkv</span><br><span class="line">mkv 文件剪辑，截取片段，指定音轨。https:<span class="comment">//www.playpi.org/2019032701.html</span></span><br><span class="line">-- -ss 表示开始时间，-to 表示结束时间，</span><br><span class="line">ffmpeg -ss <span class="number">01</span>:<span class="number">22</span>:<span class="number">08</span> -to <span class="number">01</span>:<span class="number">32</span>:<span class="number">16</span> -accurate_seek -i <span class="keyword">in</span>.mkv -map <span class="number">0</span>:v -map <span class="number">0</span>:a:<span class="number">1</span> -codec copy -avoid_negative_ts <span class="number">1</span> out.mkv</span><br><span class="line">-- 视频使用 h264 编码，音频使用 aac 编码 </span><br><span class="line">ffmpeg -i input.rmvb -c:v h264 -c:a aac out.mp4</span><br><span class="line">给视频添加水印https:<span class="comment">//www.njphper.com/posts/2ffce39e.html</span></span><br><span class="line"><span class="comment">// ffmpeg -i birds.mp4 -i watermark.png</span></span><br><span class="line">        -filter_complex <span class="string">"overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2"</span> birds2.mp4</span><br><span class="line">        </span><br><span class="line">ffmpeg -i birds.mp4 -i watermark2.png</span><br><span class="line">-filter_complex <span class="string">"pad=height=ih+40:color=#71cbf4,overlay=(main_w-overlay_w)/2:main_h-overlay_h"</span></span><br><span class="line">birds3.mp4</span><br><span class="line">ffmpeg -i yii.mp4 -i logo.jpg -strict <span class="number">-2</span> -filter_complex <span class="string">"overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2"</span> birds2.mp4</span><br></pre></td></tr></table></figure>
<h3 id="AnyProxy简介移动端抓包工具"><a href="#AnyProxy简介移动端抓包工具" class="headerlink" title="AnyProxy简介移动端抓包工具"></a>AnyProxy简介移动端抓包工具</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">npm install -g anyproxy</span><br><span class="line">~ anyproxy</span><br><span class="line">[AnyProxy Log][<span class="number">2018</span><span class="number">-12</span><span class="number">-26</span> <span class="number">11</span>:<span class="number">42</span>:<span class="number">19</span>]: Http proxy started on port <span class="number">8001</span></span><br><span class="line">[AnyProxy Log][<span class="number">2018</span><span class="number">-12</span><span class="number">-26</span> <span class="number">11</span>:<span class="number">42</span>:<span class="number">19</span>]: web interface started on port <span class="number">8002</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">//  稳定版本生成方法</span></span><br><span class="line">~ sudo anyproxy --root</span><br><span class="line"><span class="comment">//  最新版本生成方法</span></span><br><span class="line">~ anyproxy-ca</span><br><span class="line">支持 Https 方式重新启动 AnyProxy</span><br><span class="line"></span><br><span class="line"> </span><br><span class="line">~ anyproxy --intercept</span><br><span class="line"><span class="comment">//  简写</span></span><br><span class="line">~ anyproxy -i</span><br><span class="line">https:<span class="comment">//duanruilong.github.io/blog/2018/12/26/AnyProxy%E7%AE%80%E4%BB%8B%E7%A7%BB%E5%8A%A8%E7%AB%AF%E6%8A%93%E5%8C%85%E5%B7%A5%E5%85%B7/</span></span><br></pre></td></tr></table></figure>
<h3 id="docsify"><a href="#docsify" class="headerlink" title="docsify"></a>docsify</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">npm i docsify-cli -g</span><br><span class="line">docsify init ./docs</span><br><span class="line">初始化成功后，可以看到 ./docs 目录下创建的几个文件</span><br><span class="line"></span><br><span class="line">index.html 入口文件</span><br><span class="line">README.md 会做为主页内容渲染</span><br><span class="line">.nojekyll 用于阻止 GitHub Pages 会忽略掉下划线开头的文件</span><br><span class="line">直接编辑 docs/README.md 就能更新网站内容，当然也可以写多个页面</span><br><span class="line"></span><br><span class="line">本地服务器通过 docsify serve 可以方便的预览效果，而且提供 LiveReload 功能，可以让实时的预览。默认访问 http:<span class="comment">//localhost:3000 。</span></span><br><span class="line"></span><br><span class="line">https:<span class="comment">//duanruilong.github.io/blog/2019/03/14/docsify%E7%A5%9E%E5%A5%87%E7%9A%84%E6%96%87%E6%A1%A3%E7%BD%91%E7%AB%99%E7%94%9F%E6%88%90%E5%B7%A5%E5%85%B7/  https://www.bbsmax.com/A/A7zgplD1J4/</span></span><br></pre></td></tr></table></figure>
<h3 id="终端代码生成好看的图片"><a href="#终端代码生成好看的图片" class="headerlink" title="终端代码生成好看的图片"></a>终端代码生成好看的图片</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">npm i -g carbon-now-cli</span><br><span class="line">https:<span class="comment">//github.com/mixn/carbon-now-cli</span></span><br><span class="line">$ carbon-now --help</span><br><span class="line"></span><br><span class="line">Beautiful images <span class="keyword">of</span> your code — <span class="keyword">from</span> right inside your terminal.</span><br><span class="line"></span><br><span class="line">Usage</span><br><span class="line">  $ carbon-now &lt;file&gt;</span><br><span class="line">  $ pbpaste | carbon-now</span><br><span class="line">  $ carbon-now --<span class="keyword">from</span>-clipboard</span><br><span class="line">  $ carbon-now unfold.js</span><br><span class="line">  Takes the entire source <span class="keyword">of</span> unfold.js, uses Carbon’s <span class="keyword">default</span> settings and saves <span class="keyword">as</span> .png into your cwd.</span><br></pre></td></tr></table></figure>
<h3 id="网页成为桌面应用程序"><a href="#网页成为桌面应用程序" class="headerlink" title="网页成为桌面应用程序"></a>网页成为桌面应用程序</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install nativefier -g</span><br><span class="line">nativefier --name <span class="string">"LearnKu"</span> <span class="string">"https://learnku.com"</span></span><br></pre></td></tr></table></figure>
<h3 id="网页保存成-PDF"><a href="#网页保存成-PDF" class="headerlink" title="网页保存成 PDF"></a>网页保存成 PDF</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"> https:<span class="comment">//github.com/danburzo/percollate </span></span><br><span class="line">npm install -g percollate</span><br><span class="line">To transform a single web page to PDF:</span><br><span class="line"></span><br><span class="line">percollate pdf --output some.pdf https:<span class="comment">//example.com</span></span><br><span class="line">To bundle several web pages into a single PDF, specify them <span class="keyword">as</span> separate <span class="built_in">arguments</span> to the command:</span><br><span class="line"></span><br><span class="line">percollate pdf --output some.pdf https:<span class="comment">//example.com/page1 https://example.com/page2</span></span><br><span class="line">You can use common Unix commands and keep the list <span class="keyword">of</span> URLs <span class="keyword">in</span> a newline-delimited text file:</span><br><span class="line"></span><br><span class="line">cat urls.txt | xargs percollate pdf --output some.pdf</span><br><span class="line">To transform several web pages into individual PDF files at once, use the --individual flag:</span><br><span class="line"></span><br><span class="line">percollate pdf --individual https:<span class="comment">//example.com/page1 https://example.com/page2</span></span><br><span class="line">https:<span class="comment">//www.sejda.com/html-to-pdf</span></span><br></pre></td></tr></table></figure>
<h3 id="命令行截图"><a href="#命令行截图" class="headerlink" title="命令行截图"></a>命令行截图</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">npm i -g screenshoteer</span><br><span class="line">You can use screenshoteer like <span class="keyword">this</span>:</span><br><span class="line"></span><br><span class="line">screenshoteer  --url https:<span class="comment">//www.example.com</span></span><br><span class="line"></span><br><span class="line">or .html localy copy the url path <span class="keyword">from</span> the browser</span><br><span class="line"></span><br><span class="line">screenshoteer --url file:<span class="comment">///Users/../index.html</span></span><br><span class="line">screenshoteer --url file:<span class="comment">///C:/Users/../Random-HTML-file.html</span></span><br></pre></td></tr></table></figure>
<h3 id="任意网站变成桌面软件"><a href="#任意网站变成桌面软件" class="headerlink" title="任意网站变成桌面软件"></a>任意网站变成桌面软件</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">npm i -g nativefier</span><br><span class="line">nativefier <span class="string">"https://segmentfault.com"</span></span><br><span class="line">nativefier --name <span class="string">"SegmentFault"</span> <span class="string">"https://segmentfault.com/"</span></span><br><span class="line">https:<span class="comment">//segmentfault.com/a/1190000012924855</span></span><br></pre></td></tr></table></figure>
<h3 id="windows-scoop"><a href="#windows-scoop" class="headerlink" title="windows scoop"></a>windows scoop</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">在 PowerShell 中输入下面内容，保证允许本地脚本的执行：</span><br><span class="line"></span><br><span class="line">set-executionpolicy remotesigned -scope currentuser</span><br><span class="line">执行下面的命令安装 Scoop：</span><br><span class="line"></span><br><span class="line">iex (<span class="keyword">new</span>-object net.webclient).downloadstring(<span class="string">'https://get.scoop.sh'</span>)</span><br><span class="line">scoop search git</span><br><span class="line">scoop install git</span><br><span class="line"></span><br><span class="line">https:<span class="comment">//laravelcode.cn/posts/98/scoop-installation-and-use</span></span><br></pre></td></tr></table></figure>
<h3 id="gitbook-1"><a href="#gitbook-1" class="headerlink" title="gitbook"></a>gitbook</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">λ npm install -g gitbook-cli</span><br><span class="line">npm ERR! path C:\Users\xxx\AppData\Roaming\npm\node_modules\gitbook-cli\node_modules\npmi\node_modules\npm\node_modules\ansistyles</span><br><span class="line">npm ERR! code ENOENT</span><br><span class="line">npm ERR! errno <span class="number">-4058</span></span><br><span class="line">npm ERR! syscall rename</span><br><span class="line">npm ERR! enoent ENOENT: no such file or directory, rename <span class="string">'C:\Users\xxx\AppData\Roaming\npm\node_modules\gitbook-cli\node_modules\npmi\node_modules\npm\node_modules\ansistyles'</span> -&gt; <span class="string">'C:\Users\xxx\AppData\Roaming\npm\node_modules\gitbook-cli\node_modules\npmi\node_modules\npm\node_modules\.ansistyles.DELETE'</span></span><br><span class="line">npm ERR! enoent This is related to npm not being able to find a file.</span><br><span class="line">npm ERR! enoent</span><br><span class="line"></span><br><span class="line">npm ERR! A complete log <span class="keyword">of</span> <span class="keyword">this</span> run can be found <span class="keyword">in</span>:</span><br><span class="line">npm ERR!     C:\Users\xxx\AppData\Roaming\npm-cache\_logs\<span class="number">2019</span><span class="number">-12</span><span class="number">-17</span>T07_10_31_419Z-debug.log</span><br><span class="line"></span><br><span class="line">删除这个目录 C:\Users\xxx\AppData\Roaming\npm\node_modules\gitbook-cli\node_modules</span><br><span class="line">λ npm install -g gitbook-cli</span><br><span class="line">C:\Users\xxx\AppData\Roaming\npm\gitbook -&gt; C:\Users\xxx\AppData\Roaming\npm\node_modules\gitbook-cli\bin\gitbook.js</span><br><span class="line">+ gitbook-cli@<span class="number">2.3</span><span class="number">.2</span></span><br><span class="line">added <span class="number">577</span> packages and updated <span class="number">1</span> package <span class="keyword">in</span> <span class="number">33.056</span>s</span><br></pre></td></tr></table></figure>
<h3 id="使用tree生成目录树"><a href="#使用tree生成目录树" class="headerlink" title="使用tree生成目录树"></a>使用tree生成目录树</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line">npm install -g tree-node-cli</span><br><span class="line">C:\Users\xxx\AppData\Roaming\npm\treee -&gt; C:\Users\xxx\AppData\Roaming\npm\node_modules\tree-node-cli\bin\tree.js</span><br><span class="line">C:\Users\xxx\AppData\Roaming\npm\tree -&gt; C:\Users\xxx\AppData\Roaming\npm\node_modules\tree-node-cli\bin\tree.js</span><br><span class="line">+ tree-node-cli@<span class="number">1.2</span><span class="number">.5</span></span><br><span class="line">added <span class="number">2</span> packages <span class="keyword">in</span> <span class="number">2.572</span>s</span><br><span class="line">tree --help</span><br><span class="line">Usage: tree [options]</span><br><span class="line"></span><br><span class="line">Options:</span><br><span class="line">  -V, --version             output the version number</span><br><span class="line">  -a, --all-files           All files, include hidden files, are printed.</span><br><span class="line">  --dirs-first              List directories before files.</span><br><span class="line">  -d, --dirs-only           List directories only.</span><br><span class="line">  -I, --exclude [patterns]  Exclude files that match the pattern. | separates alternate patterns. Wrap your entire pattern <span class="keyword">in</span> double quotes. E.g. <span class="string">`"node_modules|coverage".</span></span><br><span class="line"><span class="string">  -L, --max-depth &lt;n&gt;       Max display depth of the directory tree.</span></span><br><span class="line"><span class="string">  -r, --reverse             Sort the output in reverse alphabetic order.</span></span><br><span class="line"><span class="string">  -F, --trailing-slash      Append a '/' for directories.</span></span><br><span class="line"><span class="string">  -h, --help                output usage information</span></span><br><span class="line"><span class="string">  tree -L 3 -I "vendor" &gt; tree.md</span></span><br><span class="line"><span class="string">  </span></span><br><span class="line"><span class="string">https://hanyajun.com/tools/windows_tree_skill/</span></span><br><span class="line"><span class="string">  链接：https://hanyajun.com/tools/windows_tree_skill/来源：hanyajun.com</span></span><br></pre></td></tr></table></figure>
<p><a href="https://github.com/shadowsocksrr/shadowsocksr" target="_blank" rel="noopener">ss</a></p>
<p><a href="https://jqterm.com/?query=." target="_blank" rel="noopener">json cli</a></p>
<p><a href="https://linux.cn/article-10171-1.html" target="_blank" rel="noopener">命令行：增强版</a></p>
<p><a href="http://wuyuan.io/tutorials" target="_blank" rel="noopener">SQL 书写 + 视窗组件绑定 + 流程配置</a></p>
<p><a href="https://www.goozp.com/article/48.html" target="_blank" rel="noopener">使用Gitbook编写书籍文档</a></p>
<p><a href="https://github.com/chubin/wttr.in" target="_blank" rel="noopener">天气查询</a></p>
<p><a href="https://learnku.com/articles/26231#topnav" target="_blank" rel="noopener">命令行终端控制转义序列</a></p>
<p><a href="https://github.com/coreybutler/nvm-windows/releases" target="_blank" rel="noopener">Nodejs多版本切换https://tingtas.com/posts/2ec3f20f/</a></p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/命令行/" rel="tag"># 命令行</a>
          
            <a href="/tags/工具/" rel="tag"># 工具</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/11/28/多版本php/" rel="next" title="多版本php">
                <i class="fa fa-chevron-left"></i> 多版本php
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/11/29/Python命令行工具/" rel="prev" title="Python命令行工具">
                Python命令行工具 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
          <div class="comments" id="comments">
             <div id="gitment-container"></div>
         </div>
  




        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">苏生不惑</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">382</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">37</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/sushengbuhuo" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mysusheng@gmail.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://plus.google.com/mysusheng" target="_blank" title="Google">
                      
                        <i class="fa fa-fw fa-google"></i>Google</a>
                  </span>
                
            </div>
          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                Links
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="http://v2ex.com/" title="v2ex" target="_blank">v2ex</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.fanhaobai.com/" title="fanhaobai" target="_blank">fanhaobai</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://yuanxuxu.com/archives/" title="yuanxuxu" target="_blank">yuanxuxu</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.snail-c.cn/article" title="snail-c" target="_blank">snail-c</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://showcj.com/archives" title="showcj" target="_blank">showcj</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://vultr.aicnm.com/%E6%9C%80%E6%96%B0Vultr%E6%B3%A8%E5%86%8C%E5%8F%8AVPS%E8%B4%AD%E4%B9%B0%E5%9B%BE%E6%96%87%E6%95%99%E7%A8%8B/" title="vultr" target="_blank">vultr</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.lucissfer.com/" title="lucissfer" target="_blank">lucissfer</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://blog.csdn.net/fdipzone/article/details/79352685" title="傲雪星枫" target="_blank">傲雪星枫</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.yoby123.cn/index.php/category/default/" title="小白的分享" target="_blank">小白的分享</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.cnblogs.com/52fhy/p/5819995.html" title="PHP攻城狮" target="_blank">PHP攻城狮</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://blog.jiaojie.site/" title="php" target="_blank">php</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://sphard.com/archives/" title="sphard" target="_blank">sphard</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://yuanxuxu.com/archives/" title="LNMP技术栈笔记" target="_blank">LNMP技术栈笔记</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.coding10.com/" title="学习 Laravel" target="_blank">学习 Laravel</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://shuwoom.com/?page_id=929" title="区块链学习指南" target="_blank">区块链学习指南</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://greenlightt.github.io/archives/" title="greenlightt" target="_blank">greenlightt</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.0php.net/archives/" title="0php" target="_blank">0php</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.fordba.com/category/mysql" title="mysql" target="_blank">mysql</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.itcodemonkey.com/" title="程序员" target="_blank">程序员</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.yanshuo.me/r/v2ex" title="言说" target="_blank">言说</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.timiguo.com/archive.html" title="提米果的博客" target="_blank">提米果的博客</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://phpartisan.cn/news/112.html" title="phpartisan" target="_blank">phpartisan</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.cnblogs.com/52fhy/" title="飞鸿影" target="_blank">飞鸿影</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.54php.cn/" title="54php" target="_blank">54php</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.lazyman.vip/" title="营销" target="_blank">营销</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.njphper.com/archives/" title="做人呢最重要的就是开心" target="_blank">做人呢最重要的就是开心</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.h57.pw/" title="php 初心者" target="_blank">php 初心者</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#安装node"><span class="nav-number">1.</span> <span class="nav-text">安装node</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#显示npm命令行包"><span class="nav-number">2.</span> <span class="nav-text">显示npm命令行包</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#文件比较"><span class="nav-number">3.</span> <span class="nav-text">文件比较</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#录制-CLI"><span class="nav-number">4.</span> <span class="nav-text">录制 CLI</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#gitbook-cli"><span class="nav-number">5.</span> <span class="nav-text">gitbook-cli</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#查询天气"><span class="nav-number">6.</span> <span class="nav-text">查询天气</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#生成各种不同环境下某个网页的截图"><span class="nav-number">7.</span> <span class="nav-text">生成各种不同环境下某个网页的截图</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#豆瓣电台命令行版"><span class="nav-number">8.</span> <span class="nav-text">豆瓣电台命令行版</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#不再为文档而发愁"><span class="nav-number">9.</span> <span class="nav-text">不再为文档而发愁</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#pdf转换"><span class="nav-number">10.</span> <span class="nav-text">pdf转换</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#mp4转gif"><span class="nav-number">11.</span> <span class="nav-text">mp4转gif</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#系统面板"><span class="nav-number">12.</span> <span class="nav-text">系统面板</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#gitbook"><span class="nav-number">13.</span> <span class="nav-text">gitbook</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#个人脚本管理工具"><span class="nav-number">14.</span> <span class="nav-text">个人脚本管理工具</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#静态博客"><span class="nav-number">15.</span> <span class="nav-text">静态博客</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#rest-api-json"><span class="nav-number">16.</span> <span class="nav-text">rest api json</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#md预览"><span class="nav-number">17.</span> <span class="nav-text">md预览</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Web-开发调试工具"><span class="nav-number">18.</span> <span class="nav-text">Web 开发调试工具</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#下载在线音乐歌词"><span class="nav-number">19.</span> <span class="nav-text">下载在线音乐歌词</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#控制台登录pc浏览器"><span class="nav-number">20.</span> <span class="nav-text">控制台登录pc浏览器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#屏幕截图"><span class="nav-number">21.</span> <span class="nav-text">屏幕截图</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#公众号文章抓取"><span class="nav-number">22.</span> <span class="nav-text">公众号文章抓取</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#网页打包"><span class="nav-number">23.</span> <span class="nav-text">网页打包</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#nodeppt"><span class="nav-number">24.</span> <span class="nav-text">nodeppt</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#网页转图片"><span class="nav-number">25.</span> <span class="nav-text">网页转图片</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#汉字拼音转换"><span class="nav-number">26.</span> <span class="nav-text">汉字拼音转换</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#md-ppt"><span class="nav-number">27.</span> <span class="nav-text">md ppt</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实时编辑刷新的前端服务器"><span class="nav-number">28.</span> <span class="nav-text">实时编辑刷新的前端服务器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#二维码"><span class="nav-number">29.</span> <span class="nav-text">二维码</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#静态站点生成器"><span class="nav-number">30.</span> <span class="nav-text">静态站点生成器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#网络测速"><span class="nav-number">31.</span> <span class="nav-text">网络测速</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#运行SQL查询并可视化结果"><span class="nav-number">32.</span> <span class="nav-text">运行SQL查询并可视化结果</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#检查网站堆栈"><span class="nav-number">33.</span> <span class="nav-text">检查网站堆栈</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#种子"><span class="nav-number">34.</span> <span class="nav-text">种子</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#命令行提示"><span class="nav-number">35.</span> <span class="nav-text">命令行提示</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#以太坊的开发环境"><span class="nav-number">36.</span> <span class="nav-text">以太坊的开发环境</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#流媒体客户端"><span class="nav-number">37.</span> <span class="nav-text">流媒体客户端</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#wtfjs"><span class="nav-number">38.</span> <span class="nav-text">wtfjs</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#wtfpython"><span class="nav-number">39.</span> <span class="nav-text">wtfpython</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#前端模拟用工具"><span class="nav-number">40.</span> <span class="nav-text">前端模拟用工具</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#MySql数据库生成REST-API"><span class="nav-number">41.</span> <span class="nav-text">MySql数据库生成REST API</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#检查基金收入"><span class="nav-number">42.</span> <span class="nav-text">检查基金收入</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#静态文件服务器"><span class="nav-number">43.</span> <span class="nav-text">静态文件服务器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#图片识别"><span class="nav-number">44.</span> <span class="nav-text">图片识别</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#翻译"><span class="nav-number">45.</span> <span class="nav-text">翻译</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#镜像管理"><span class="nav-number">46.</span> <span class="nav-text">镜像管理</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#将纯文本转换为ascii"><span class="nav-number">47.</span> <span class="nav-text">将纯文本转换为ascii</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#进程管理"><span class="nav-number">48.</span> <span class="nav-text">进程管理</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#版本管理器-n"><span class="nav-number">49.</span> <span class="nav-text">版本管理器 n</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#find替代方案"><span class="nav-number">50.</span> <span class="nav-text">find替代方案</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#jq"><span class="nav-number">51.</span> <span class="nav-text">jq</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#json"><span class="nav-number">52.</span> <span class="nav-text">json</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#查看-Git-文件变动历史"><span class="nav-number">53.</span> <span class="nav-text">查看 Git 文件变动历史</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#中文加空格"><span class="nav-number">54.</span> <span class="nav-text">中文加空格</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#网页截图"><span class="nav-number">55.</span> <span class="nav-text">网页截图</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#stackoverflow-from-the-terminal"><span class="nav-number">56.</span> <span class="nav-text">stackoverflow from the terminal</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#ppt转图片"><span class="nav-number">57.</span> <span class="nav-text">ppt转图片</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#FFmpeg"><span class="nav-number">58.</span> <span class="nav-text">FFmpeg</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#AnyProxy简介移动端抓包工具"><span class="nav-number">59.</span> <span class="nav-text">AnyProxy简介移动端抓包工具</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#docsify"><span class="nav-number">60.</span> <span class="nav-text">docsify</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#终端代码生成好看的图片"><span class="nav-number">61.</span> <span class="nav-text">终端代码生成好看的图片</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#网页成为桌面应用程序"><span class="nav-number">62.</span> <span class="nav-text">网页成为桌面应用程序</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#网页保存成-PDF"><span class="nav-number">63.</span> <span class="nav-text">网页保存成 PDF</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#命令行截图"><span class="nav-number">64.</span> <span class="nav-text">命令行截图</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#任意网站变成桌面软件"><span class="nav-number">65.</span> <span class="nav-text">任意网站变成桌面软件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#windows-scoop"><span class="nav-number">66.</span> <span class="nav-text">windows scoop</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#gitbook-1"><span class="nav-number">67.</span> <span class="nav-text">gitbook</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#使用tree生成目录树"><span class="nav-number">68.</span> <span class="nav-text">使用tree生成目录树</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

<div class="copyright">&copy; <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">苏生不惑</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>



<div>
<span id="showDays"></span>

</div>

<span id="busuanzi_container_site_pv">
   总访问量:<span id="busuanzi_value_site_pv"></span>次
</span>



  <span class="post-meta-divider">|</span>



<div class="theme-info">
  <div class="powered-by"></div>
  <span class="post-count">博客全站共773.8k字</span>
</div>
<script>
var birthDay = new Date("11/20/2018");
var now = new Date();
var duration = now.getTime() - birthDay.getTime();
var total= Math.floor(duration / (1000 * 60 * 60 * 24));
document.getElementById("showDays").innerHTML = "本站已运行 "+total+" 天";
</script>

        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      人次
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  











<script type="text/javascript">
    (function() {
        // 匿名函数，防止污染全局变量
        var utterances = document.createElement('script');
        utterances.type = 'text/javascript';
        utterances.async = true;
        utterances.setAttribute('issue-term','0')
        utterances.setAttribute('theme','')
        utterances.setAttribute('repo','sushengbuhuo/laravel_ioc_demo')
        utterances.crossorigin = 'anonymous';
        utterances.src = 'https://utteranc.es/client.js';
        // content 是要插入评论的地方
        document.getElementById('gitment-container').appendChild(utterances);
    })();
</script>


  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  
  

  

  

  

  
<script>
  ((window.gitter = {}).chat = {}).options = {
    //room替换成自己的聊天室名称即可，room的名称规则是：username/roomname
    room: 'sushengbuhuo-chat/mychat'
  };
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>

</body>
</html>
